<?php

use App\Models\FhBanner;
use App\Models\FhPage;
use App\Models\FhFooter;
use App\Models\FhSetting;
function getMenu(){

    $page = new FhPage();
    $nav = $page->getNav();
    return $nav;
}

function getSub(){

    $page = new FhPage();
    $nav = $page->getSub();
    return $nav;
}


function getWeb(){
    $data = FhSetting::first();
    return $data;
}

function NewBanner($id){
    $url = FhBanner::where("pid",$id)->orderby('created_at','desc')->value('img');
    return $url;
}

function getfooter(){
    $fo = new FhFooter();
    $nav = $fo->getCate();
    return $nav;
}